﻿using System;

namespace Signit.Sdk
{
    public class SignitException : Exception
    {
        private readonly int httpCode;
        private readonly string type;

        public SignitException(Exception e) : base(null, e) { }

        public SignitException(string message) : base(message) { }

        public SignitException(string message, Exception e) : base(message, e) { }

        public SignitException(string message, int httpCode, string type)
            : this(message, httpCode, type, null) { }

        public SignitException(string message, int httpCode, string type, Exception e) : base(message, e)
        {
            this.httpCode = httpCode;
            this.type = type;
        }

        public int getHttpCode()
        {
            return httpCode;
        }

        public string getType()
        {
            return type;
        }
    }
}
